
#ifndef _UI_COMMON_H_
#define _UI_COMMON_H_

#include <stdlib.h>
#include <stdio.h>
#include <string.h>
#include "event.h"

//#include "fta.h"


#include "osp.h"
#include "dbgprint.h"

#include "gui_drawbase.h"
#include "ColorChange.h" 
//#include "jmorecfg.h"


#if (GRAPHICS_COLOR_MODE==16)
#define UI_LISTCAPCOLOR     		0xf49C
#define UI_SWCOLOR 			       0xfBDD//small windows 
#define UI_MENUBGCOLOR		       0xfaac
#define UI_LISTBGCOLOR			0xf46B//0xd0535b7c
#define UI_LISTBGSelCOLOR		0xffb5//0xff8794C8
#define UI_LISTTEXTCOLOR		0xffff
#define UI_LISTTEXTSELCOLOR	0xf000

#define UI_REDCOLOR 			0xfF65
#define UI_YELLOWCOLOR 		0xfFF9

//#define UI_CUREVBGCOLOR		0x808995C9
//#define UI_NEXTEVBGCOLOR		0x80B1C5F7

#define UI_DIALOGCOLOR     		UI_MENUBGCOLOR//0xff525B7C

#define UI_HELPBGCOLOR 				0xface

#define UI_PROGRESSBARBGCOLOR		0xfBEF
#define UI_PROGRESSBARCOLOR		0xfAB1
#define UI_DIALOGBGCOLOR			0xf334

#define UI_CUREVENTBGCOLOR	       0xf8AD
#define UI_NEXTEVENTBGCOLOR	0xfABF
#define UI_SCAN_CLEARCOLOR  0x0000
#elif ((GRAPHICS_COLOR_MODE==32) || (GRAPHICS_COLOR_MODE==15))
#define UI_LISTCAPCOLOR     		0x80499DC9
#define UI_SWCOLOR 			       0x80BBD3DB//small windows 
#define UI_MENUBGCOLOR		       0x80a1a7c5
#define UI_LISTBGCOLOR			0x80426BB2//0xd0535b7c
#define UI_LISTBGSelCOLOR		0x80fdb055//0xff8794C8
#define UI_LISTTEXTCOLOR		0x80ffffff
#define UI_LISTTEXTSELCOLOR	0x80000000

#define UI_REDCOLOR 			0x80FD645C
#define UI_YELLOWCOLOR 		0x80FFFF9B

//#define UI_CUREVBGCOLOR		0x808995C9
//#define UI_NEXTEVBGCOLOR		0x80B1C5F7

#define UI_DIALOGCOLOR     		UI_MENUBGCOLOR//0xff525B7C

#define UI_HELPBGCOLOR 				0x80abcdef

#define UI_PROGRESSBARBGCOLOR		0x80B1E1F5
#define UI_PROGRESSBARCOLOR		0x80AEB71D
#define UI_DIALOGBGCOLOR			0xd03C3E45

#define UI_CUREVENTBGCOLOR	       0x808CA2DC
#define UI_NEXTEVENTBGCOLOR	0x80A3BBF7
#define UI_SCAN_CLEARCOLOR  color_clarity
#endif


#define UI_EPG_DialogX		240
#define UI_EPG_DialogY		188
#define UI_EPG_DialogW		836
#define UI_EPG_DialogH		325
#define UI_EPG_DialogNameY  (UI_EPG_DialogY+63)
#define UI_EPG_DialogDesY	(UI_EPG_DialogNameY+88)
#define UI_EPG_DialogHelpY	(UI_EPG_DialogDesY+75)

typedef struct
{
    unsigned short iGroundIndex;
    unsigned short iServerId;
    unsigned short iProgramId;
    unsigned short iUserqueue;
    char progname[30];
    char curEvent[64];
}UI_PROG_INFO;

/** pic show type */
typedef enum
{
    DRAW_BY_PICINFO = 0,    /** use pic default size */
    DRAW_BY_SET             /** use user set size */
}UI_PIC_DRAW_TYPE;

typedef enum
{
    DRAW_LEFT,
    DRAW_CENTER,
    DRAW_RIGHT	
}UI_DRAWTEXT_POSITION;
/** pic show type */
typedef enum
{
    LANGUAGE_TYPE_CHN = 0,    /** */
    LANGUAGE_TYPE_ENG,             /***/
    LANGUAGE_TYPE_BUTT             /***/
}LANGUAGE_TYPE;






//extern void GT_ShowHeadBar(int startx, int starty, int endx, int endy,char* text,GT_ALIGN alignmode,U32 nTxtColor);
//extern void GT_ShowItem_BG(int startx, int starty, int endx, int endy);

#endif

